package com.emns.service.mobile;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.emns.dao.YueduCommentMapper;
import com.emns.pojo.YueduComment;
import common.PageInfo;

@Service
public class YueduCommentMobileService {

	@Autowired
	YueduCommentMapper ydcm;

	public int addYueduComment(YueduComment yc) {
		int count = ydcm.insert(yc);
		return count;
	}

	public void queryPageAll(Integer yueduId, PageInfo<YueduComment> pageInfo) {
		List<YueduComment> yuduList = ydcm.getCommentMobileRecordPage(yueduId,
				pageInfo);
		int count = ydcm.getCommentMobileRecordCount(yueduId);
		pageInfo.setDataArray(yuduList);
		pageInfo.setPageCount(count);
	}
}
